<template>
	<view>
		<view class="login-container">
			<view class="login-card">
			<view class="login-title">登录</view>
			<view class="form-item">
				<input type="text" placeholder="请输入用户名"/>
			</view>
			<view class="form-item">
				<input type="password" placeholder="请输入密码" />
			</view>
			<view class="login-btn">
				<button type="primary" >登录</button>
			</view>
			<view class="login-nav">
			    <view>没有账号？<navigator class="login-nav" url="/pages/tabBar/register/register">去注册</navigator></view>
			</view>
		</view>
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				
			}
		},
		methods: {
			handleLogin(){
				if(!this.username || !this.password){
					uni.showToast({
						title:'请输入完整信息',
						icon:'none'
					})
					return
				}
				if(this.username==='fbn'&&this.password==='12345'){
					uni.showLoading({
						title:'登录中...'
					})
					setTimeout(()=>{
						uni.hideLoading()
						uni.showToast({
							title:'登录成功'
						})
						uni.switchTab({
							url:"/pages/tabBar/component/component"
						})
					},1000)
				}else{
					uni.showToast({
						title:'密码错误，请重新输入！'
					});
					this.password='';
					this.isPwdfocus=true;
				}
			}
	},
	}
	
</script>

<style>
	       
</style>
